import Layout from "@/layout/index.vue";
import Login from '@/pages/Login/index.vue'
import Home from "@/pages/Home/index.vue";
import Playback from "@/pages/Playback/index.vue";
import Cameras from "@/pages/Cameras/index.vue";
// import Vas from "@/pages/VideoAnalysis/index.vue";
import Vas from "@/pages/VAs/index.vue";
import System from "@/pages/System/index.vue";
import Users from "@/pages/Users/index.vue";
import Log from "@/pages/Log/index.vue";
import Shop from "@/pages/Shop/index.vue";
export const routes = [
  {
    path: "/login",
    name: "Login",
    component: Login,
    meta: {
      title: 'Login',
    },
  },{
    path: "/",
    component: Layout,
    name: "Layout",
    redirect: "/home",
    children: [
      {
        path: "/home",
        name: "Home",
        component: Home,
        meta: {
          title: 'Home',
        },
      },{
        path: "/Playback",
        name: "Playback",
        component: Playback,
        meta: {
          title: 'Playback',
        },
      },{
        path: "/Vas",
        name: "Vas",
        component: Vas,
        meta: {
          title: 'Vas',
        },
        redirect:'/Vas/vastore',
        children:[
          {
            path:'vastore',
            name:'vastore',
            component: () => import('@/pages/VAs/vastore/index.vue')
          },{
            path:'vasetup',
            name:'vasetup',
            component: () => import('@/pages/VAs/vasetup/index.vue')
          },{
            path:'myva',
            name:'myva',
            component: () => import('@/pages/VAs/myva/index.vue')
          }
        ],
      },{
        path: "/Cameras",
        name: "Cameras",
        component: Cameras,
        meta: {
          title: 'Cameras',
        },
      },{
        path: "/System",
        name: "System",
        component: System,
        meta: {
          title: 'System',
        },
      },{
        path: "/Users",
        name: "Users",
        component: Users,
        meta: {
          title: 'Users',
        },
        redirect:'/Users/roles',
        children:[
          {
            path:'roles',
            name:'roles',
            component: () => import('@/pages/Users/roles/index.vue')
          },{
            path:'accounts',
            name:'accounts',
            component: () => import('@/pages/Users/accounts/index.vue')
          }
        ],
      },
      {
        path: "/Log",
        name: "Log",
        component: Log,
        meta: {
          title: 'Activity Log',
        },
      },
      {
        path: "/Shop",
        name: "Shop",
        component: Shop,
        meta: {
          title: 'Shop',
        },
      },
    ],
  },
  // {
  //   path: "/404",
  //   component: () => import("../pages/404.vue"),
  //   meta: {
  //     title: '404',
  //     isAuth: false,
  //   },
  // },
];

// 任意路由
export const anyRoutes = [
  {
    path: "/:pathMatch(.*)*",
    redirect: "/404",
    name: "Any",
    meta: {
      title: "404",
      isAuth: false,
    },
  },
];
